package org.spring.springcloud.consumer.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spring.springcloud.consumer.api.CityApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CityController {

	private Logger logger = LoggerFactory.getLogger(CityController.class);
	
	 @Autowired
	 CityApi cityApi;
	
	
	@RequestMapping("/{name}")
    public String home(@PathVariable("name") String name) {
		logger.info("consumer   ----->name =" + name);
    	return cityApi.home(name);
    }
	
	
	
}
